package com.lanqiao.companymanage.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanqiao.companymanage.entity.Cost;
import com.lanqiao.companymanage.entity.Management;
import com.lanqiao.companymanage.service.CompanyCostService;
import com.lanqiao.companymanage.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 何小棍
 * 公司费用查询
 */
@RestController
@RequestMapping("/companyCost")
@Api(tags = "公司费用")
public class CompanyCostController {

    @Autowired
    CompanyCostService companyCostService;
    /**
     * 公司费用分页查询
     * @param costPage
     * @return
     */
    @GetMapping("/getCompanyCost")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current", value = "当前页数,默认第一页"),
            @ApiImplicitParam(name = "size", value = "每页显示条数，默认 10")})
    @ApiOperation(value = "公司费用分页查询")
    public Result getCompanyCost(Page<Cost> costPage){
        Page<Cost> list =  companyCostService.getCompanyCost(costPage);
        return Result.success(list);
    }

}
